<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style/css/main.css" rel="stylesheet" type="text/css" />
<script src="style/js/jquery.js" type="text/javascript"></script>
<script src="style/js/main.js" type="text/javascript"></script>
<title>统计管理</title>
</head>

<body>
<div class="main">
	<div class="tj_body">
<?php
if($tj_pager === 'reader')
{
?> 
    <h3><?php echo $title;?><em>读者总数：&nbsp;<font color="orange"><?php echo $total;?></font>&nbsp;人</em></h3>   	
        <dl>
        <?php
        if(!empty($res))
        {
        	foreach($res as $k=>$v)
            {
            	if($v == '')
                {
                	$v = 0;
                }
      			echo '<dd class="tjr">' . $k . '：<em><img  src="../public/tj_img.php?num=' . $v . '&total=' . $total . '" /></em>' . $v . '&nbsp;人</dd>';     
        	}
        }
        ?>
    	</dl>
<?php
}
elseif($tj_pager === 'book')
{
?>
	<h3><?php echo $title;?><em>图书总数：&nbsp;<font color="orange"><?php echo $total;?></font>&nbsp;本</em></h3>
    <dl>
    	<dt>
        	<ul>
                <li class="tj_li">
                <a  href="tongji.php?t=book&dis=tj1" <?php if($dis == 'tj1'){ echo 'id="selected" ' ;}?>>按图书类别</a>
                </li>
                <li class="tj_li">
                <a  href="tongji.php?t=book&dis=tj2" <?php if($dis == 'tj2'){ echo 'id="selected" ' ;}?>>按出版社</a>
                </li>
                <li class="tj_li">
                <a  href="tongji.php?t=book&dis=tj3" <?php if($dis == 'tj3'){ echo 'id="selected" ' ;}?>>按出版日期</a>
                </li>
            </ul>
        </dt>
        <div <?php if($dis != 'tj1'){echo 'class="tj_hide"';}?>>
        <?php
        if(!empty($tj_class))
        {
       		foreach($tj_class as $v)
            {
        		echo '<dd class="tjb">' . $v['value'] . '<em><font color="red">' . $v['counts'] . '</font>&nbsp;本</em></dd>';
        	}
        }
        ?>
        </div>
        <div <?php if($dis != 'tj2'){echo 'class="tj_hide"';}?>>
        <?php
        if(!empty($tj_pstore))
        {
       		foreach($tj_pstore as $v)
            {
        		echo '<dd class="tjb">' . $v['pstore'] . '<em><font color="red">' . $v['num'] . '</font>&nbsp;本</em></dd>';
        	}
        }
        ?>
        </div>
        <div <?php if($dis != 'tj3'){echo 'class="tj_hide"';}?>>
            <dd class="tjb">近一年：<em><font color="#FF0000"><?php echo $tj_pdate[1];?></font>&nbsp;本</em></dd>
            <dd class="tjb">近两年：<em><font color="#FF0000"><?php echo $tj_pdate[2];?></font>&nbsp;本</em></dd>
            <dd class="tjb">近三年：<em><font color="#FF0000"><?php echo $tj_pdate[3];?></font>&nbsp;本</em></dd>
            <dd class="tjb">近四年：<em><font color="#FF0000"><?php echo $tj_pdate[4];?></font>&nbsp;本</em></dd>
            <dd class="tjb">近五年：<em><font color="#FF0000"><?php echo $tj_pdate[5];?></font>&nbsp;本</em></dd>
            <dd class="tjb">五年以上：<em><font color="#FF0000"><?php echo $tj_pdate[6];?></font>&nbsp;本</em></dd>
        </div>
    </dl>
<?php
}
?>
	</div>
</div>
<?php echo $copyright;?>
</body>
</html>
